<%@tag import="java.io.DataInputStream"%>
<%@tag import="java.io.FileInputStream"%>
<%@tag import="java.io.DataOutputStream"%>
<%@tag import="java.io.FileOutputStream"%>
<%@tag import="java.io.IOException"%>
<%@tag import="java.io.File"%>
<%@tag language="java" contentType="charset=UTF-8"
	tagEncoding="UTF-8"%>
<%!int number = 0;
		File file = new File("count.txt");
		synchronized void countPeople() {
			if (!file.exists())//如果文件不存在
			{
				number++;
				try {
					file.createNewFile();
					FileOutputStream fos = new FileOutputStream("count.txt");
					DataOutputStream dos = new DataOutputStream(fos);
					dos.writeInt(number);
					fos.close();
					dos.close();

				} catch (IOException e) {
					
				}
			} else {
				try {
					FileInputStream fis = new FileInputStream("count.txt");
					DataInputStream dis = new DataInputStream(fis);
					number = dis.readInt();
					number++;
					fis.close();
					dis.close();
					FileOutputStream fos = new FileOutputStream("count.txt");
					DataOutputStream dos = new DataOutputStream(fos);
					dos.writeInt(number);
					fos.close();
					dos.close();
				} catch (IOException etwo) {
					
				}
			}
		}
		%>